package patrol.mobile.com.mobilepatrol.test;

import android.content.Context;

import com.dl7.recycler.adapter.BaseQuickAdapter;
import com.dl7.recycler.adapter.BaseViewHolder;

import java.util.List;

import patrol.mobile.com.mobilepatrol.R;

/**
 * Created by apple on 17/9/30.
 */

public class TeacherAdapter extends BaseQuickAdapter<Teacher> {
    public TeacherAdapter(Context context,List<Teacher> data) {
        super(context,data);
    }

    @Override
    protected int attachLayoutRes() {
        return R.layout.item8;
    }

    @Override
    protected void convert(BaseViewHolder holder, Teacher item) {
        holder.setText(R.id.tv1, item.name);
        holder.setText(R.id.tv2, item.students.size()+"");
    }
}
